package com.gljx.web.service.impl;

import com.gljx.web.Entity.Recordoutentry;
import com.gljx.web.Entity.Student;
import com.gljx.web.dao.RecordoutentryMapper;
import com.gljx.web.dao.StudentMapper;
import com.gljx.web.service.RecordoutentryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/11/7 0007.
 */
@Service
public class RecordoutentryServiceImpl implements RecordoutentryService {

    @Autowired
    StudentMapper studentMapper;
    @Autowired
    private RecordoutentryMapper recordoutentryMapper;

    /**
     * @Author lcx
     * @Date 2017/11/7 0007 下午 1:39
     * 根据fid查询
     */
    @Override
    public List<Recordoutentry> selectRecordoutentryByFid(String fid) {
        return recordoutentryMapper.selectRecordoutentryByFparentid(fid);
    }

    /**
     * @Author lcx
     * @Date 2017/11/9 0009 下午 4:10
     * 更新
     */
    @Override
    public void updateRecordoutentry(Recordoutentry recordoutentry) {
        recordoutentryMapper.insertSelective(recordoutentry);
    }

    /**
     * @Author lcx
     * @Date 2017/11/10 0010 上午 10:56
     * 调用存储过程查询学生信息
     */
    @Override
    public void selectStudent() {

    }

    /**
     * @Author lcx
     * @Date 2017/11/11 0011 上午 10:10\
     * 更具id查询学生
     */
    @Override
    public Student selectStudentById(String id) {
        return studentMapper.selectStudentById(id);
    }

    @Override
    public void addRecordoutentry(Recordoutentry recordoutentry) {
        recordoutentryMapper.insertSelective(recordoutentry);
    }

    @Override
    public void delRecordoutentry(String fid) {
        recordoutentryMapper.deleteByPrimaryKey(fid);
    }
}
